package com.example.iotmanagerment26.domain;
import org.springframework.stereotype.Component;

/**
 * 作者：太难猫
 * 创建时间： 2025/6/27 00:03
 */

@Component
public class DeviceWithLocation {
    // Device属性
    private int id;
    private int userCount;
    private String name;
    private String type;
    private String description;
    private String createTime;

    // DeviceLocation属性
    private int locationId;
    private String deviceName;
    private double latitude;
    private double longitude;
    private String location;

    // 构造方法
    public DeviceWithLocation() {
    }

    public DeviceWithLocation(int id, int userCount, String name, String type, String description, String createTime,
                              int locationId, String deviceName, double latitude, double longitude, String location) {
        this.id = id;
        this.userCount = userCount;
        this.name = name;
        this.type = type;
        this.description = description;
        this.createTime = createTime;
        this.locationId = locationId;
        this.deviceName = deviceName;
        this.latitude = latitude;
        this.longitude = longitude;
        this.location = location;
    }

    // Getter和Setter方法
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getUserCount() {
        return userCount;
    }

    public void setUserCount(int userCount) {
        this.userCount = userCount;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public int getLocationId() {
        return locationId;
    }

    public void setLocationId(int locationId) {
        this.locationId = locationId;
    }

    public String getDeviceName() {
        return deviceName;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }

    public double getLatitude() {
        return latitude;
    }

    public void setLatitude(double latitude) {
        this.latitude = latitude;
    }

    public double getLongitude() {
        return longitude;
    }

    public void setLongitude(double longitude) {
        this.longitude = longitude;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    @Override
    public String toString() {
        return "DeviceWithLocation{" +
                "id=" + id +
                ", userCount=" + userCount +
                ", name='" + name + '\'' +
                ", type='" + type + '\'' +
                ", description='" + description + '\'' +
                ", createTime='" + createTime + '\'' +
                ", locationId=" + locationId +
                ", deviceName='" + deviceName + '\'' +
                ", latitude=" + latitude +
                ", longitude=" + longitude +
                ", location='" + location + '\'' +
                '}';
    }
}